Producer–consumer problem